Digital Garden of Paul

Layered And Segmented Architecture

Digital transformation increasingly depends on API-driven strategies. APIs are the digital connectors that act as glue between autonomous digital assets. Connecting humans, things, applications, and data is a fundamental requirement to become a digitally-drive organisation.

Layered and segmented architecture are two API-centric architecture patterns.

Layered architecture

Layers typically describe the same responsibility of a group of components in terms of similar capabilities. The number of layers can differ, but most approaches recognise at least three layers: presentation, logic, and data. Data flows between layers. often in a sequential manner.

As microservices became popular it led to the introduction of microservices into existing architectures. As enterprises and teams were struggling to integrate this well a microservice layer came to surface, as shown in the image below.

The paper identifies the following limitations with this paradigm.

Primarily the business logic and integration logic focused on service composition (orchestration and choreography) moved to microservices. The centralised nature of the runtime, dependency with multiple application architecture layers, and hypervisor-based and bare-metal infrastructure did not support the flexibility and depth required for MSA. Container-based infrastructures were there at that time, such as Linux Containers (LXC) and Warden, but they were not mature enough to run production systems.

Segmented architecture

As enterprises moved to adopt agile methodologies and self-organising teams, shifting full ownership to end-to-end teams, it also introduced ownership of runtimes by breaking up those runtimes into smaller partitions. Hence, segments. This allowed for more freedom in application development by providing isolation on runtime level.

Thee segmentation approaches can be categorised:

  1. Runtime partitioning
    1. Break-up into segments by looking toward business domains. This often leads to a paradigm of a segmented service layers, and use of shared services by all those segments in the other layers.
  2. Multi-tenancy
    1. Introduces isolation in hosted solutions, for example Software-as-a-Service.
  3. Platform of platforms
    1. Entire platform duplicated and treated as a segment for a business unit or agile team. For each new project, an entire platform is newly provisioned and made available.

Segmented architecture and APIs

In a segmented architecture the usage of API is similar to the layered architecture. It is recommended to use APIs to communicate between segments. APIs glue the segments as wel as the components inside each segment.

Source: wso2/reference-architecture ยท GitHub

Layered And Segmented Architecture